from rest_framework import serializers

from apps.user.models import User, UserHeadImage


class UserHeadImageModelSerializer(serializers.ModelSerializer):
    class Meta:
        model = UserHeadImage
        fields = '__all__'


class UserInfoModelSerializer(serializers.ModelSerializer):
    user_img = UserHeadImageModelSerializer(read_only=True)

    class Meta:
        id = serializers.IntegerField(read_only=True)
        model = User
        fields = ['id', 'username', 'gender', 'birthday', 'life_status', 'signature', 'job', 'occupation', 'user_img']
